package com.meihuayishu.backend.dto;

import lombok.Data;
import lombok.Builder;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(description = "保存占卜记录响应")
public class SaveDivinationRecordResponse {
    
    @Schema(description = "记录ID", example = "rec_1704097800789")
    private String recordId;
    
    @Schema(description = "用户ID", example = "user_1704096000123")
    private String userId;
    
    @Schema(description = "创建时间", example = "2024-01-01T11:10:00.000Z")
    private LocalDateTime createdAt;
    
    @Schema(description = "获得经验值", example = "10")
    private Integer experienceGained;
    
    @Schema(description = "新等级", example = "进阶者")
    private String newLevel;
    
    @Schema(description = "解锁成就")
    private List<Achievement> achievements;
    
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    @Schema(description = "成就信息")
    public static class Achievement {
        @Schema(description = "成就类型", example = "DIVINATION_COUNT")
        private String type;
        
        @Schema(description = "成就名称", example = "初步探索")
        private String name;
        
        @Schema(description = "成就描述", example = "完成第10次占卜")
        private String description;
        
        @Schema(description = "解锁时间", example = "2024-01-01T11:10:00.000Z")
        private LocalDateTime unlockedAt;
    }
}